<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
	</head>
	<body>
		<div id="app4" v-cloak>
			<input name="age" v-model="age"/>
			<button @click="bigger()">扩大10倍</button>
			<button @click="bigger2()">加10</button><br />
			<input name="name" v-model.trim="name" />长度{{name.length}}<br />
			<input name="name2" v-model.lazy="name2" />{{name2}}
		</div>
		
		<script src="../vue.js"></script>
		<script>
			const a2 = new Vue({
				el: '#app4',
				data: {
					age: '',
					name: '',
					name2: ''
				},
				methods:{
					bigger: function(){
						this.age = parseInt(this.age) * 10
					},
					bigger2: function(){
						this.age = parseInt(this.age) + 10
					}
				}
			})
		</script>
	</body>
</html>
